/* eslint-disable react/prop-types */
import React from 'react';
import { BrowserRouter, Route, Redirect, Switch } from 'react-router-dom';
import Login from '@/pages/login/index'
import Regist from '@/pages/regist/index'
import Find from '@/pages/find/index'
import Mysite from '@/pages/mysite/index'
import PrivateRoute from './privateRoute';

class AppRouter extends React.Component {
  render() {
    return (
      <BrowserRouter basename="/">
        <Switch>
          <Route exact path="/">
            <Redirect to="/login" />
          </Route>
          <Route path="/login" component={Login} />
          <Route path="/regist" component={Regist} />
          <Route path="/find" component={Find} />
          <PrivateRoute exact component={Mysite} />
        </Switch>
      </BrowserRouter>
    )
  }
}
export default AppRouter;
